home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 003 / _mindimage / !MindImage / ReadMe < prev    next >
Text File  |  1992-12-01  |  6KB  |  170 lines

  1. MindImages - Documentation for Archimedes version 1.00: 30 November 1992
  2.  
  3. Program conceived and created by:
  4.  
  5.  Rob Scott       : Robert.Scott@newcastle.ac.uk
  6.  Gordon Flanagan : G.J.Flanagan@newcastle.ac.uk
  7.  Eric Thompson   : E.Thompson@newcastle.ac.uk
  8.  
  9. To load MindImages, double click on the module icon within the DeskTop
  10. environment or from a command line type:
  11.  
  12. *RMLOAD MINDIMAGES
  13.  
  14.  
  15. Description:
  16. ============
  17.  
  18.  MindImages was written to allow the creation of single image random dot
  19. stereograms (sirds) from compressed depth information. The compression format
  20. was specifically designed to allow direct transmission across the Internet
  21. to the newsgroup alt.3d, where the interest in sirds has snowballed in the
  22. last few months, thanks to Andy Kinsmans' Torus - a couple of hundred K
  23. postscript bit image.
  24.  
  25.  Needless to say, postscript images take up a lot of network bandwidth, so
  26. it was decided to take the original depth information, compress it and
  27. transmit the much smaller (5 - 30K typ.) files.
  28.  
  29.  MindImages will take the files as input and create either:
  30.    
  31.   An on screen black and white rds,
  32.   An on screen red/green or red/blue stereogram (use coloured glasses)
  33.   A postscript bit image to throw at your postscript printer.
  34.  
  35.  
  36. Viewing sirds:
  37. ==============
  38.  
  39.  There are two ways to view these stereograms. These are:
  40.         
  41.             1) wide eyed.
  42.             2) cross eyed.
  43.  
  44.  Both will create a 3d image in the brain, but the image will be inverted
  45. using one way as opposed to the other. That is to say, parts of the image
  46. which are raised when viewed wide eyed will descend into the screen or paper
  47. if viewed cross eyed.
  48.  
  49.  It is helpful when starting to put two small pieces of blu-tac or coloured
  50. sticky tape on the top of the monitor. These should be at exactly 1/5 of 
  51. the display window apart, in the centre.
  52.  
  53.  With the stereogram on the monitor or piece of paper:
  54.  
  55.   1) At about 30 - 50 cm from the display, focus on a point directly
  56. behind (3 metres or more away) so that the two marks are out of focus and
  57. have split into four marks. Now, by adjusting your focus/distance try to
  58. get the right hand mark as seen by the left eye and the left hand mark as
  59. seen by the right eye to converge. When these lock together, keep the same
  60. dopey look and allow your eyes to drop down onto the random pattern - 
  61. you should now be smiling as the 3d picture appears from nowhere.
  62.  
  63.   2) At a distance that is comfortable, cross your eyes until you have
  64. three marks in focus and gaze at the random pattern as above.
  65.  
  66. Note: If you are using the screen display, *Density 128 makes the picture
  67. easier to see for most people, whereas *Density 200 is easier for a
  68. postscript image (and saves toner).
  69.  
  70.  
  71. Compressed file format:
  72. =======================
  73.  
  74.  [You need only read this if you are curious]
  75.  
  76.  The first line of the compressed file contains a copyright message
  77. terminated by a line feed and/or carriage return.
  78.  
  79.  The following lines are separated line feeds and/or carriage returns
  80. at a convenient line width (usually 75 chars). These separators are ignored
  81. by the program.
  82.  
  83.  The next two bytes refer to the xcale and yscale respectively. The largest
  84. size handled being 512x by 512y (xscale=1 yscale=1). An xscale of 2 and
  85. yscale of 4 would describe depth info of a 256x by 128y grid. The scale
  86. values are added to 33 to get them into the ascii range (this would have
  87. been 32, the space character, but some terminals/machines strip trailing
  88. spaces).
  89.  
  90.  In this case, the depth value has been limited to the range 0 - 63,
  91. conveniently leaving 30 unused values in the ascii range after adding the
  92. 33 offset. Total range here is 33 to 126.
  93.  
  94.  In creating the output file, a variation of run length encoding is used to
  95. fill a large buffer with depth values and running counts (up to 96)
  96. i.e. if there are 12 horizontal values of depth 25 then the buffer would
  97. contain 25,12,...
  98.  
  99. Now the unused ascii values come into play:
  100.  We can look at the previous 30 colour/count combinations (or up to the 
  101. current number of combinations processed-2 if we have done less than 30)
  102. and if we find that this 25,12 combination has appeared within this range 
  103. at say, the 14th position back, then we would place the single value:
  104.  
  105.                     33+63+14=110 in our output file.
  106.  
  107.  If however, this colour/count combination did not exist within this range,
  108. then we would place the values:
  109.  
  110.                 33+colour and 33+count in our output file.
  111.  
  112. Thus if repeated values are present we reduce the total number of bytes
  113. needed even further.
  114.  
  115.  The last valid byte in the output file is a checksum which is the sum of all
  116. the bytes in the title string that are greater than 32 added to (the sum of
  117. all the succeeding bytes in the output file - 33, ignoring line feeds etc).
  118.  
  119.  Now take this number MOD 64 and add 33 ...done!
  120.   
  121.  The checksum allows a check on file integrity and helps to protect the
  122. copyright string at the start which will be printed at the top left hand
  123. corner of the printed image.
  124.  
  125.  
  126. Commands:
  127. =========
  128.  
  129.  This is a listing of the on-line help from the MindImages module:
  130.  
  131. ==> Help on keyword MindImages
  132. Module is: MindImages   1.00 (25 Nov 1992) (C) Rob Scott
  133.  
  134. Commands provided:
  135. MindImage       Density RedBlue RedGreen        Invert  Normal  PScreate
  136.  
  137. ==> Help on keyword MindImage
  138. *MindImage will create a random dot stereogram in either two or four colours
  139. depending upon the screen mode selected (0,18,8 or 19).
  140. See the ReadMe file for more info about the input file type etc.
  141. Syntax: *MindImage <filename> [<screen mode>]
  142.  
  143. ==> Help on keyword Density
  144. *Density governs the ratio of white to black in the finished random dot
  145. stereogram (default 200 - 4:1)
  146. Syntax: *Density <1-255>   
  147.  
  148. ==> Help on keyword RedBlue
  149. *RedBlue allows generation of stereograms for viewing with red (left eye) and
  150. blue tinted glasses
  151. Syntax: *RedBlue
  152.  
  153. ==> Help on keyword RedGreen
  154. *RedGreen allows generation of stereograms for viewing with red (left eye)
  155. and green tinted glasses
  156. Syntax: *RedGreen
  157.  
  158. ==> Help on keyword Invert
  159. *Invert allows cross eyed viewing of wide eyed stereograms and vice versa
  160. Syntax: *Invert
  161.  
  162. ==> Help on keyword Normal
  163. *Normal cancels the effect of *Invert
  164. Syntax: *Normal
  165.  
  166. ==> Help on keyword PScreate
  167. *PScreate creates a random dot stereogram postscript file (325K long)
  168. Syntax: *PScreate <infile> <outfile>
  169.  
  170.